const mongoose = require('mongoose');

// 1. 设置集合结构
const goodsSchema = new mongoose.Schema({
    // _id:String,
    goodsname: String,
    goodsimg:String,
    price:String,
    num:String,
    shop:String,
    descs:String,
    guige:String,
    // shopId:"店铺ID"
// }, { versionKey: false 
});
// 2. 创建集合模型
// mongoose.model('模型名称', 集合结构名称, 集合名称);
// mongoose.model('shop', shopSchema);
mongoose.model('goodsModel', goodsSchema, 'goods');